const {DataTemplateModel} = require('../../models/models');


function removeTemplate(json={}){
    const {username,templateId} = json;
    if(username && templateId){
        return new Promise((res) =>{
            DataTemplateModel.deleteOne(json).then(docs =>res({status:0,data:docs}))
            .catch(err =>res({status:1}))
        })
    }else{
        return{status:1,data:'用户名数据点id无效'}
    }

}


module.exports = removeTemplate;